package com.mycom.service.impl;

import com.mycom.dao.TeamSaveFormDao;
import com.mycom.dao.UserFormDao;
import com.mycom.pojo.TeamSaveForm;
import com.mycom.pojo.UserForm;
import com.mycom.service.TeamSaveFormService;
import com.mycom.service.UserFormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeamSaveFormServiceImpl implements TeamSaveFormService {
    @Autowired
    private TeamSaveFormDao teamSaveFormDao;

    @Override
    public boolean save(TeamSaveForm teamSaveForm) {
        return teamSaveFormDao.save(teamSaveForm)>0 ? true : false;
    }

    @Override
    public boolean deleteByFormNumber(String formNumber) {
        return teamSaveFormDao.deleteByFormNumber(formNumber)>=0 ? true : false;
    }

    public List<TeamSaveForm> findByIdCardNumber(String idCardNumber){
        return teamSaveFormDao.findByIdCardNumber(idCardNumber);
    }

    @Override
    public TeamSaveForm findByFormNumber(String formNumber) {
        return teamSaveFormDao.findByFormNumber(formNumber);
    }

    @Override
    public boolean deleteMany(String[] formNumbers) {
        return teamSaveFormDao.deleteMany(formNumbers) >= 0 ? true : false ;
    }
}
